package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

/**
 * Created by HangLiu on 2017/4/13.
 */
@Entity
@Table(name = "t_flowup_report", schema = "live", catalog = "")
public class TFlowupReportModel {
    private Long id;
    private String permit;//许可
    private Date followUpdate;//跟进日期
    private String cusName;//线索姓名
    private String tel;//电话号码
    private Date createdDate;//线索创建日期
    private String source;//来源渠道
    private String cusLevel;//意向级别
    private String carType;//意向车型
    private String scId;//销售顾问
    private String scName;//销售顾问姓名
    private String scGroup;//销售组
    private Integer nowDuration;//当天跟进通话时长
    private String nowRemark;//当天跟进备注
    private Date oldDate;//上一次跟进日期
    private Integer oldDuration;//上一次跟进通话时长
    private String oldRemark;//上一次跟进备注
    private Date oldInDate;//最近一次进店日期
    private Date orderDate;//订单日期
    private Date invoiceDate;//开票日期
    private Timestamp updateTime;//

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "follow_update")
    public Date getFollowUpdate() {
        return followUpdate;
    }

    public void setFollowUpdate(Date followUpdate) {
        this.followUpdate = followUpdate;
    }

    @Basic
    @Column(name = "cus_name")
    public String getCusName() {
        return cusName;
    }

    public void setCusName(String cusName) {
        this.cusName = cusName;
    }

    @Basic
    @Column(name = "tel")
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "created_date")
    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    @Basic
    @Column(name = "source")
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "cus_level")
    public String getCusLevel() {
        return cusLevel;
    }

    public void setCusLevel(String cusLevel) {
        this.cusLevel = cusLevel;
    }

    @Basic
    @Column(name = "car_type")
    public String getCarType() {
        return carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    @Basic
    @Column(name = "sc_id")
    public String getScId() {
        return scId;
    }

    public void setScId(String scId) {
        this.scId = scId;
    }

    @Basic
    @Column(name = "sc_name")
    public String getScName() {
        return scName;
    }

    public void setScName(String scName) {
        this.scName = scName;
    }

    @Basic
    @Column(name = "sc_group")
    public String getScGroup() {
        return scGroup;
    }

    public void setScGroup(String scGroup) {
        this.scGroup = scGroup;
    }

    @Basic
    @Column(name = "now_duration")
    public Integer getNowDuration() {
        return nowDuration;
    }

    public void setNowDuration(Integer nowDuration) {
        this.nowDuration = nowDuration;
    }

    @Basic
    @Column(name = "now_remark")
    public String getNowRemark() {
        return nowRemark;
    }

    public void setNowRemark(String nowRemark) {
        this.nowRemark = nowRemark;
    }

    @Basic
    @Column(name = "old_date")
    public Date getOldDate() {
        return oldDate;
    }

    public void setOldDate(Date oldDate) {
        this.oldDate = oldDate;
    }

    @Basic
    @Column(name = "old_duration")
    public Integer getOldDuration() {
        return oldDuration;
    }

    public void setOldDuration(Integer oldDuration) {
        this.oldDuration = oldDuration;
    }

    @Basic
    @Column(name = "old_remark")
    public String getOldRemark() {
        return oldRemark;
    }

    public void setOldRemark(String oldRemark) {
        this.oldRemark = oldRemark;
    }

    @Basic
    @Column(name = "old_in_date")
    public Date getOldInDate() {
        return oldInDate;
    }

    public void setOldInDate(Date oldInDate) {
        this.oldInDate = oldInDate;
    }

    @Basic
    @Column(name = "order_date")
    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    @Basic
    @Column(name = "invoice_date")
    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TFlowupReportModel that = (TFlowupReportModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (followUpdate != null ? !followUpdate.equals(that.followUpdate) : that.followUpdate != null) return false;
        if (cusName != null ? !cusName.equals(that.cusName) : that.cusName != null) return false;
        if (tel != null ? !tel.equals(that.tel) : that.tel != null) return false;
        if (createdDate != null ? !createdDate.equals(that.createdDate) : that.createdDate != null) return false;
        if (source != null ? !source.equals(that.source) : that.source != null) return false;
        if (cusLevel != null ? !cusLevel.equals(that.cusLevel) : that.cusLevel != null) return false;
        if (carType != null ? !carType.equals(that.carType) : that.carType != null) return false;
        if (scId != null ? !scId.equals(that.scId) : that.scId != null) return false;
        if (scName != null ? !scName.equals(that.scName) : that.scName != null) return false;
        if (scGroup != null ? !scGroup.equals(that.scGroup) : that.scGroup != null) return false;
        if (nowDuration != null ? !nowDuration.equals(that.nowDuration) : that.nowDuration != null) return false;
        if (nowRemark != null ? !nowRemark.equals(that.nowRemark) : that.nowRemark != null) return false;
        if (oldDate != null ? !oldDate.equals(that.oldDate) : that.oldDate != null) return false;
        if (oldDuration != null ? !oldDuration.equals(that.oldDuration) : that.oldDuration != null) return false;
        if (oldRemark != null ? !oldRemark.equals(that.oldRemark) : that.oldRemark != null) return false;
        if (oldInDate != null ? !oldInDate.equals(that.oldInDate) : that.oldInDate != null) return false;
        if (orderDate != null ? !orderDate.equals(that.orderDate) : that.orderDate != null) return false;
        if (invoiceDate != null ? !invoiceDate.equals(that.invoiceDate) : that.invoiceDate != null) return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (followUpdate != null ? followUpdate.hashCode() : 0);
        result = 31 * result + (cusName != null ? cusName.hashCode() : 0);
        result = 31 * result + (tel != null ? tel.hashCode() : 0);
        result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0);
        result = 31 * result + (source != null ? source.hashCode() : 0);
        result = 31 * result + (cusLevel != null ? cusLevel.hashCode() : 0);
        result = 31 * result + (carType != null ? carType.hashCode() : 0);
        result = 31 * result + (scId != null ? scId.hashCode() : 0);
        result = 31 * result + (scName != null ? scName.hashCode() : 0);
        result = 31 * result + (scGroup != null ? scGroup.hashCode() : 0);
        result = 31 * result + (nowDuration != null ? nowDuration.hashCode() : 0);
        result = 31 * result + (nowRemark != null ? nowRemark.hashCode() : 0);
        result = 31 * result + (oldDate != null ? oldDate.hashCode() : 0);
        result = 31 * result + (oldDuration != null ? oldDuration.hashCode() : 0);
        result = 31 * result + (oldRemark != null ? oldRemark.hashCode() : 0);
        result = 31 * result + (oldInDate != null ? oldInDate.hashCode() : 0);
        result = 31 * result + (orderDate != null ? orderDate.hashCode() : 0);
        result = 31 * result + (invoiceDate != null ? invoiceDate.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
